$("input[name='time_from']").click(function () {
    $("input[name='time_from']").datetimepicker('show');
});
$("input[name='time_from']").datetimepicker({
    startDate: '2000-01-01',
    format: 'yyyy-mm-dd hh:ii',
    pickerPosition: 'bottom-right',
}).on('changeDate', function (e) {
    $("input[name='time_from']").datetimepicker('autoclose', true);
});
$("input[name='time_to']").click(function () {
    $("input[name='time_to']").datetimepicker('show');
});
$("input[name='time_to']").datetimepicker({
    startDate: '2000-01-01',
    format: 'yyyy-mm-dd hh:ii',
    pickerPosition: 'bottom-right',
}).on('changeDate', function (e) {
    $("input[name='time_to']").datetimepicker('autoclose', true);
});
$(".searchsubmit").click(function () {
    var data = $("#searchform").serialize();
    window.location.href = '/withdrawals/adopt?' + data;
});